package com.t371.spring;

import com.t371.spring.entity.Employee;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        // 加载Spring配置文件
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        // 获取bean实例
        Employee employee = (Employee) context.getBean("employee");

        // 调用自我介绍方法
        employee.introduce();
    }

}
